#ifdef __cplusplus
    #include <cstdlib>
#else
    #include <stdlib.h>
#endif

#include <SDL/SDL.h>

int main ( int argc, char** argv )
{
 int DO=1;
 SDL_Event event;

    freopen("CON","w",stdout);
    freopen("CON","r",stdin);


    if ( SDL_Init( SDL_INIT_VIDEO ) < 0 )
    {
        printf( "Unable to init SDL: %s\n", SDL_GetError() );
        return 1;
    }

    SDL_Surface* screen = SDL_SetVideoMode(640, 480, 16,SDL_HWSURFACE|SDL_DOUBLEBUF);
    SDL_Surface* bmp = SDL_LoadBMP("imageergerg");
    SDL_Rect dstrect;

    dstrect.x = (screen->w - bmp->w) / 2;
    dstrect.y = (screen->h - bmp->h) / 2;


while(1)
{


        while (SDL_PollEvent(&event))
    {
        switch(event.type)
        {

        case SDL_MOUSEMOTION:


           {

            int x=event.motion.x;
            int y=event.motion.y;

    if(x<screen->w/2+dstrect.x/2 && x>screen->w/2-dstrect.x/2 && y<screen->h/2+dstrect.y/2 && y>screen->h/2-dstrect.y/2)
        printf("yes");


        else


        printf("no");






    SDL_FillRect(screen, 0, SDL_MapRGB(screen->format, 0, 0, 0));
    SDL_BlitSurface(bmp, 0, screen, &dstrect);
    SDL_Flip(screen);
    break;
           }


      }

        }}
    return 0;
    }
